package com.spc.car.data.service.project;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.spc.car.data.domain.project.dto.GetProjectRelationshipsDTO;
import com.spc.car.data.domain.project.po.CreateProjectRelationPO;
import com.spc.car.data.domain.project.po.DropProjectRelationPO;
import com.spc.car.data.domain.project.po.GetProjectRelationshipsPO;
import com.spc.car.data.entity.project.ProjectTenderingProject;

/**
 * <p>
 * 招标项目与项目关系表 服务类
 * </p>
 *
 * @author 
 * @since 2020-04-09
 */
public interface ProjectTenderingProjectService extends IService<ProjectTenderingProject> {

    /**
     * 为项目与招标项目建立关系
     * @param po
     * @return
     */
    int establishRelationships(CreateProjectRelationPO createProjectRelationPO);

    /**
     * 取消项目与招标项目中建立的现有关系
     * @param po
     * @return
     */
    boolean cancelRelationships(DropProjectRelationPO po);

    /**
     * 通过招标项目Code获取关系列表
     * @param po
     * @return
     */
    Page<GetProjectRelationshipsDTO> listProjectRelationshipsByCode(GetProjectRelationshipsPO<GetProjectRelationshipsDTO> po);
}
